<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>2.html</title>
</head>

<body>
    <script>
        let arr = ['abc', 'abcd', 'sss', '2', 'd', 't', '2', 'ss', 'f', '22', 'd'];
        let obj = {};
        let arr1 = [];
        for (let i = 0, length = arr.length; i < length; i++) {
            if (obj[arr[i]] != arr[i]) {
                obj[arr[i]] = arr[i];
                arr1[arr1.length] = obj[arr[i]];
            }
        }
        arr = arr1;
        console.log(arr);
    </script>
</body>

</html>